﻿using System;
using Unknown.Framework.Database;
using Unknown.Example.Entity.Personnel;

namespace Unknown.Example.Sql.Personnel
{
	/// <summary>
	/// 职员SQL接口
	/// </summary>
	public interface IEmployeeSql
	{
		/// <summary>
		/// 构建新增
		/// </summary>
		/// <param name="entity">实体</param>
		/// <returns>操作</returns>
		Operation BuildInsert(Employee entity);

		/// <summary>
		/// 构建修改
		/// </summary>
		/// <param name="entity">实体</param>
		/// <returns>操作</returns>
		Operation BuildUpdate(Employee entity);

		/// <summary>
		/// 构建删除
		/// </summary>
		/// <param name="pkid">标识</param>
		/// <returns>操作</returns>
		Operation BuildDelete(string pkid);

		/// <summary>
		/// 构建查询
		/// </summary>
		/// <param name="first">开始行</param>
		/// <param name="last">结束行</param>
		/// <returns>操作</returns>
		Operation BuildSelect(int first, int last);

		/// <summary>
		/// 构建查询
		/// </summary>
		/// <param name="pkid">标识</param>
		/// <returns>操作</returns>
		Operation BuildSelect(string pkid);

		/// <summary>
		/// 构建查询
		/// </summary>
		/// <param name="entity">实体</param>
		/// <returns>操作</returns>
		Operation BuildSelectUnique(Employee entity);
	}
}
